package com.google.wallet.online.jwt;

public class TransactionStatusBody {
  
  /**
   * Enumeration to define the payment processing status
   */
  public enum Status {
    SUCCESS, FAILURE
  }

  /**
   * Enumeration to define the failure reason
   */
  public enum Reason {
    BAD_CVC, BAD_CARD, DECLINED, OTHER
  }
  
  private Status status;
  private Reason reason;
  private String detailedReason;
  private String googleTransactionId;
  
  public TransactionStatusBody(String gid, Status status){
    setGoogleTransactionId(gid);
    setStatus(status);
  }
  
  public TransactionStatusBody(String gid, Status status, Reason reason){
    setGoogleTransactionId(gid);
    setStatus(status);
    setReason(reason);
  }
  /**
   * Returns the defined status
   * 
   * @return defined status
   */
  public Status getStatus() {
    return status;
  }

  /**
   * Sets the notification payment processing status
   * 
   * @param status
   */
  public void setStatus(Status status) {
    this.status = status;
  }

  /**
   * Returns the notification payment processing failure reason
   * 
   * @return failure reason
   */
  public Reason getReason() {
    return reason;
  }

  /**
   * Sets the notification payment processing failure reason
   * 
   * @param reason
   *          failure reason
   */
  public void setReason(Reason reason) {
    this.reason = reason;
  }

  /**
   * Returns the detailed failure reason
   * 
   * @return failure detailed failure reason
   */
  public String getDetailed_reason() {
    return detailedReason;
  }

  /**
   * Sets the detailed failure reason
   * 
   * @param detailed_reason
   *          detailed failure reason
   */
  public void setDetailed_reason(String detailed_reason) {
    this.detailedReason = detailed_reason;
  }

  public String getGoogleTransactionId() {
    return googleTransactionId;
  }

  public void setGoogleTransactionId(String googleTransactionId) {
    this.googleTransactionId = googleTransactionId;
  }
  
}
